{include file='header_with_login.tpl'}

<br />

{if !$identity}
<div id="main" class="main">
	<div style="text-align: center; font: bold 18px verdana, arial, sans-serif;">Mobloggin is a place to share your mobile photos and shit. So, fuck, <a style="font-size: 18px" href="/signup">sign up man</a>.</div>
</div>

<br />
<br />
{/if}

{* begin rows *}
{assign var="row0" value="<tr>"}
{assign var="row1" value="<tr>"}
{assign var="row2" value="<tr>"}
{assign var="row3" value="<tr>"}

{section name=index loop=$new_media}

	{* row... 0? - the image title *}
	{concat var="row0" value='<td><a href="/media/view/url/'}
	{concat var="row0" value=$new_media[index].url}
	{concat var="row0" value='">'}
	{concat var="row0" value=$new_media[index].title}
	{concat var="row0" value='</a></td>'}

	{* row 1 - the image *}
	{concat var="row1" value='<td width="20%">'}
	{concat var="row1" value='<a href="/media/view/url/'}
	{concat var="row1" value=$new_media[index].url}
	{concat var="row1" value='">'}
	{concat var="row1" value='<img src="'}
	{concat var="row1" value=$new_media[index].thumb_url}
	{concat var="row1" value='" /></a>'}
	{concat var="row1" value='</td>'}
			
	{* row 2 - the user name *}
	{concat var="row2" value='<td width="20%">'}
	{concat var="row2" value='Posted by <a href="/user/info/username/'}
	{concat var="row2" value=$new_media[index].username}
	{concat var="row2" value='">'}
	{concat var="row2" value=$new_media[index].username}
	{concat var="row2" value='</a><br /> on '}
	{concat var="row2" value=$new_media[index].date|date_format:"%b %e, %Y"}
	{concat var="row2" value=', '}
	{concat var="row2" value=$new_media[index].date|date_format:"%l:%M%p"|lower}
	{concat var="row2" value='</td>'}

	{* row 3 - comment count *}
	{concat var="row3" value='<td><a href="#" onClick="javascript: getComments(\''}
	{concat var="row3" value=$new_media[index].url}
	{concat var="row3" value='\');">Comments ('}
	{concat var="row3" value=$new_media[index].comment_number}
	{concat var="row3" value=')</a></td>'}

{/section}

{* end rows *}
{concat var="row1" value="</tr>"}
{concat var="row2" value="</tr>"}

<div id="main" class="main">
	<div id="centertablewrapper" class="centertablewrapper">
		<table width="100%" style="text-align:left">
			<tr><td colspan="5"><div style="font: bold 14px verdana, arial, sans-serif;">Here are the latest submissions from our featured mobloggers...</div><br /></td></tr>
			{$row1}
			{$row0}
			{$row2}
			{$row3}

			<tr>
				<td colspan="5"><div id="comments" class=""></div></td>
			</tr>
		</table>
	</div>
</div>

{include file='footer.tpl'}
